/*
 * Created on 20.07.2008
 *
 */
package com.appspot.yttv.client;

import com.google.gwt.core.client.JavaScriptObject;

/**
 * 
 * @author Uwe Maurer
 *
 */
public class MediaRss extends JavaScriptObject {

	public static class Entry  extends JavaScriptObject {
		protected Entry() {
		}

		public native final String getId() /*-{
			return this['media$group']['yt$videoid']['$t'];
		}-*/;
		
		public native final String getTitle() /*-{
		 return this.title['$t'];
		}-*/;
		
		public native final String getChannel() /*-{
		 return this.author[0].name['$t'];
		}-*/;
	}
	
	protected MediaRss() {
	}
	
	public native final String getVersion() /*-{
		return this.version;
	}-*/;
	
	public native final int getEntryLength() /*-{
		return this.feed.entry.length;
	}-*/;
	
	public native final Entry getEntry(int i) /*-{
		return this.feed.entry[i];
	}-*/;
}
